broadway: Ensure window sizes are synched right
authorAlexander Larsson <alexl@redhat.com>
Thu, 28 Mar 2013 18:00:23 +0000 (19:00 +0100)
committerAlexander Larsson <alexl@redhat.com>
Fri, 29 Mar 2013 13:09:46 +0000 (14:09 +0100)
We don't want to update the window size on configure event, only
the position, as the size is client side controlled. We were
updating to an old size during resizes which causes us to send
surfaces of the wrong size to the daemon.

gdk/broadway/broadway-server.c
gdk/broadway/gdkeventsource.c

index 86f0053a1c0b055adbaf1d8e98140906389c3ab5..77dd89471496be9814158174499324f2304c4f78 100644 (file)
@@ -1583,6 +1583,11 @@ broadway_server_window_update (BroadwayServer *server,
                                                       window->width,
                                                       window->height);
 
+  g_assert (window->width == cairo_image_surface_get_width (window->last_surface));
+  g_assert (window->width == cairo_image_surface_get_width (surface));
+  g_assert (window->height == cairo_image_surface_get_height (window->last_surface));
+  g_assert (window->height == cairo_image_surface_get_height (surface));
+
   if (server->output != NULL)
     {
       if (window->last_synced)
index a4399c431ef0c18184bf0a7bf9ed10d94d80aa82..a23da78dd02f8344e632a141584cf1c0fc32ccf1 100644 (file)
@@ -256,10 +256,6 @@ _gdk_broadway_events_got_input (BroadwayInputMsg *message)
       {
        window->x = message->configure_notify.x;
        window->y = message->configure_notify.y;
-       window->width = message->configure_notify.width;
-       window->height = message->configure_notify.height;
-       _gdk_window_update_size (window);
-       _gdk_broadway_window_resize_surface (window);
 
        event = gdk_event_new (GDK_CONFIGURE);
        event->configure.window = g_object_ref (window);